{% extends 'base.html.twig' %}

{% block body %}
    <h1>Orders list</h1>

    <table>
        <thead>
            <tr>
                <th>Id</th>
                <th>Tid</th>
                <th>Status</th>
                <th>Buyernick</th>
                <th>Payment</th>
                <th>Receivername</th>
                <th>Recevierphone</th>
                <th>Totalfee</th>
                <th>Actions</th>
            </tr>
        </thead>
        <tbody>
        {% for order in orders %}
            <tr>
                <td><a href="{{ path('orders_show', { 'id': order.id }) }}">{{ order.id }}</a></td>
                <td>{{ order.tid }}</td>
                <td>{{ order.status }}</td>
                <td>{{ order.buyerNick }}</td>
                <td>{{ order.payment }}</td>
                <td>{{ order.receiverName }}</td>
                <td>{{ order.recevierPhone }}</td>
                <td>{{ order.totalFee }}</td>
                <td>
                    <ul>
                        <li>
                            <a href="{{ path('orders_show', { 'id': order.id }) }}">show</a>
                        </li>
                        <li>
                            <a href="{{ path('orders_edit', { 'id': order.id }) }}">edit</a>
                        </li>
                    </ul>
                </td>
            </tr>
        {% endfor %}
        </tbody>
    </table>

    <ul>
        <li>
            <a href="{{ path('orders_new') }}">Create a new order</a>
        </li>
    </ul>
{% endblock %}
